package com.le.tester.dao;

import com.le.tester.entity.CommentLike;

import java.util.List;

import com.le.tester.entity.CommentLikeExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface CommentLikeMapper {
    long countByExample(CommentLikeExample example);

    int deleteByExample(CommentLikeExample example);

    int deleteByPrimaryKey(Long id);

    int insert(CommentLike record);

    int insertSelective(CommentLike record);

    List<CommentLike> selectByExample(CommentLikeExample example);

    CommentLike selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") CommentLike record, @Param("example") CommentLikeExample example);

    int updateByExample(@Param("record") CommentLike record, @Param("example") CommentLikeExample example);

    int updateByPrimaryKeySelective(CommentLike record);

    int updateByPrimaryKey(CommentLike record);

    //根据commentId获取点赞数目
    long selectLikeNumByCommentId(@Param("commentId") long commentId);

    //根据commentId和peopleId获取点赞信息
    CommentLike selectCommentLikeByCommentIdPeopleId(@Param("commentId") long commentId, @Param("peopleId") long peopleId);
    //根据CommentId PeopleId更新点赞状态
    int updateByCommentIdPeopleId(@Param("record") CommentLike record);
}